package ar.com.cema.methodology.analyzer.ui.servlet.json;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;

import ar.com.cema.methodology.analyzer.model.Survey;
import ar.com.cema.methodology.analyzer.ui.ServiceLocator;

@WebServlet(name="QuestionsJsonProviderServlet", urlPatterns = { ServiceLocator.JSON_QUESTION_LIST_MP }) 
public class QuestionsJsonProviderServlet extends JsonProviderServlet {
	private static final long serialVersionUID = 677666319152485634L;

	@Override
	protected String getJSON(HttpServletRequest request) {
		Survey survey = (Survey) request.getSession().getAttribute("survey");
		return gson.toJson(survey);
	}

}